﻿CREATE TABLE [trUser].[tblDriverOrders] (
    [IDDriverOrder]    BIGINT        IDENTITY (1, 1) NOT NULL,
    [IDDriver]         BIGINT        NOT NULL,
    [IDOrderType]      BIGINT        NOT NULL,
    [OrderQuantity]    SMALLINT      NOT NULL,
    [OrderNumber]      NVARCHAR (50) NOT NULL,
    [IsRewardOrder]    BIT           CONSTRAINT [DF_tblDriverOrders_IsRewardOrder] DEFAULT ((0)) NOT NULL,
    [DateOrderPlaced]  DATETIME      NULL,
    [DateOrderShipped] DATETIME      NULL,
    [DateCreated]      DATETIME      CONSTRAINT [DF_tblDriverOrders_DateCreated] DEFAULT (getdate()) NOT NULL,
    [DateUpdated]      DATETIME      NULL,
    [DateInactive]     DATETIME      NULL,
    CONSTRAINT [PK_tblDriverOrders] PRIMARY KEY CLUSTERED ([IDDriverOrder] ASC)
);

